package com.wcgksoft.entity.dataAnalysis;

import com.wcgksoft.entity.Equipment.DataType;
import com.wcgksoft.entity.Equipment.Equipment;
import com.wcgksoft.entity.system.EnterpriseProject;
import org.hibernate.annotations.Cascade;

import javax.persistence.*;
import java.util.Date;

/**
 * @author 蒋世维
 * 
 * 项目名称：wisdom
 * 类名称：DepartProjectData
 * 类描述：数据点
 * 创建人：jiangshiwei
 * 创建时间：2019-03-24 AM13:18:05
 * 修改备注：
 * @version  1.0.0
 */
@Entity
@Table(name="t_depart_project_data")
public class DepartProjectData {

	@Id
	@Basic(optional = false)
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", nullable = false)
	private Integer id;
	
	/**
	 * 企业的项目信息
	 */

	@OneToOne(fetch = FetchType.EAGER, optional = true)
	@JoinColumn(name = "depart_project_id", nullable = true)
	@Cascade({org.hibernate.annotations.CascadeType.REFRESH})
	private EnterpriseProject enterpriseProject;


	/**
	 * 设备
	 */
	@OneToOne(fetch = FetchType.EAGER,optional = true)
	@JoinColumn(name = "equipment_id",nullable = true)
	@Cascade({org.hibernate.annotations.CascadeType.REFRESH})
	private Equipment equipment;

	/**
	 * 数据类型 传感器类型
	 */
	@OneToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "dataType_id")
	@Cascade({org.hibernate.annotations.CascadeType.REFRESH})
	private DataType dataType;
	
	/**
	 * 数据点名称
	 */
	@Column(name = "data_name",length=100)
	private String dataName;


	/**
	 * id是打开
	 */
	@Column(name = "bbbbid",length=100)
	private Integer bbbbid;


	/**
	 * 通道号
	 */
	@Column(name = "com",length=100)
	private String com;
	
	/**
	 * 创建时间
	 */
	@Column(name = "create_date")
	private Date createDate;

	/**
	 * 项目名称
	 */
	@Column(name = "proname")
	private String name;

	@Transient
	private Threshold threshold;


	public Threshold getThreshold() {
		return threshold;
	}

	public void setThreshold(Threshold threshold) {
		this.threshold = threshold;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public EnterpriseProject getEnterpriseProject() {
		return enterpriseProject;
	}

	public void setEnterpriseProject(EnterpriseProject enterpriseProject) {
		this.enterpriseProject = enterpriseProject;
	}

	public Equipment getEquipment() {
		return equipment;
	}

	public void setEquipment(Equipment equipment) {
		this.equipment = equipment;
	}

	public DataType getDataType() {
		return dataType;
	}

	public void setDataType(DataType dataType) {
		this.dataType = dataType;
	}

	public String getDataName() {
		return dataName;
	}

	public void setDataName(String dataName) {
		this.dataName = dataName;
	}

	public String getCom() {
		return com;
	}

	public void setCom(String com) {
		this.com = com;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getBbbbid() {
		return bbbbid;
	}

	public void setBbbbid(Integer bbbbid) {
		this.bbbbid = bbbbid;
	}
}
